package vip.sweet.biz.modular.user.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import vip.sweet.biz.modular.user.entity.BizFavorites;
import vip.sweet.biz.modular.user.mapper.BizFavoritesMapper;
import vip.sweet.biz.modular.user.params.BizFavoritesAddParams;
import vip.sweet.biz.modular.user.service.BizFavoritesService;

/**
 * @author ASUS
 * @Date 2025/10/5 11:58
 * @Descripition
 */
@Service
public class BizFavoritesServiceImpl extends ServiceImpl<BizFavoritesMapper, BizFavorites> implements BizFavoritesService {
    @Override
    public boolean add(BizFavoritesAddParams addFavoritesParams) {
        if (ObjectUtil.isNotEmpty(addFavoritesParams))
            return save(BeanUtil.toBean(addFavoritesParams, BizFavorites.class));
        return false;
    }
}
